package com.nenglai.admin.modular.report.formatter;

import com.kordar.datalist.formatter.Formatter;
import com.nenglai.admin.config.ReportConfiguration;
import com.nenglai.common.util.SpringUtil;

/**
 * @author kongdehui
 * @date 2021/06/28 22:11
 **/
public class DownloadFormatter implements Formatter<String> {

    @Override
    public String format(Object value, Object... params) {
        ReportConfiguration configuration = SpringUtil.getBean(ReportConfiguration.class);
        return configuration.getHostUrl() + "/backend/report/download?reportId=" + value;
    }
}
